﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
namespace sushi.Models
{
    public class Post
    {
        public Int32 PostId { get; set; }
        [Required(ErrorMessageResourceName = "PostTitleRequired", ErrorMessageResourceType = typeof(App_GlobalResources.Blog))]
        [Display(ResourceType = typeof(App_GlobalResources.Blog), Name = "PostTitle")]
        public String title { get; set; }
        [Required(ErrorMessageResourceName="PostIntroductionRequired", ErrorMessageResourceType = typeof(App_GlobalResources.Blog))]
        [Display(ResourceType = typeof(App_GlobalResources.Blog), Name = "PostIntroduction")]
        public String Introduction { get; set; }
        [Required(ErrorMessageResourceName = "PostBodyRequired", ErrorMessageResourceType = typeof(App_GlobalResources.Blog))]
        [Display(ResourceType = typeof(App_GlobalResources.Blog), Name = "PostBody")]
        public String Body { get; set; }

        [Display(ResourceType =  typeof(App_GlobalResources.Blog), Name="PostCreationDate")]
        public DateTime Creation { get; set; }
        [Display(ResourceType =  typeof(App_GlobalResources.Blog), Name="PostLastModificationDate")]
        public DateTime LastModification { get; set; }
        
        public Int32 AuthorId { get; set; }
        public virtual Author Author { get; set; }
        public virtual List<Models.Category> Categories { get; set; }
        public virtual List<Models.Comment> Comments { get; set; } 
        
        //Faltan los Tags
        //Faltan Fuentes
    }
}